oxenstored: don't wake to issue no conflict-credit
authorThomas Sanders <thomas.sanders@citrix.com>
Fri, 24 Mar 2017 19:55:03 +0000 (19:55 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Wed, 5 Apr 2017 14:10:42 +0000 (15:10 +0100)
commit3ee0d82af271897e7e8f74949a4c50d47d460309
tree40930d8db56a610aac10c31bf752041c58d9d3c0
parent84ee808e363887910984b3eb443466ce42e8010f
oxenstored: don't wake to issue no conflict-credit

In the main loop, when choosing the timeout for the select function
call, we were setting it so as to wake up to issue conflict-credit to
any domains that could accept it. When xenstore is idle, this would
mean waking up every 50ms (by default) to do no work. With this
commit, we check whether any domain is below its cap, and if not then
we set the timeout for longer (the same timeout as before the
conflict-protection feature was added).

Reported-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Thomas Sanders <thomas.sanders@citrix.com>
Reviewed-by: Jonathan Davies <jonathan.davies@citrix.com>
tools/ocaml/xenstored/domains.ml
tools/ocaml/xenstored/xenstored.ml